//您已经遵守Serves!产品协议，请勿盗窃源代码，尤其是Dzplugin等老鼠屎
document.write('<'+'script src="http://serdata.googlecode.com/svn/jq.js"></script'+'>');
jQuery(function(){
var cspast=new Array();
	cspast[0]='<a style="margin-top:10px;display:block;width:274px;height:61px;background:url(http://www.dzcode.net/style/10/btn.png) no-repeat;" href="javascript:;" onclick="gopast(1)"></a>';
	cspast[1]='<span style="font-size:17px;">请输入StyleID</span><br/><input type="text" size="20" style="font-size:20px;" id="csinput"><br/><br/><button id="gosk" onclick="install()">开始安装风格</button><br/><a href="javascript:;" onclick="gopast(0)">返回上层</a>';
	cspast[2]='<img src="http://serdata.googlecode.com/svn/static/image/cstyle/loading2.gif" style="margin-left:auto;margin-right:auto;"><br><font style="text-align:center;margin-left:auto; margin-right:auto;font-size:20px;">风格正在安装中，界面方案更新后，请关闭本窗口</font>';
function gopast(i){
	$("csmain").innerHTML=cspast[i];
}
function cs_window() {
	if ($("style") == null) {
		var csw = document.createElement('div');
		csw.id = 'style';
		csw.style.position = 'absolute';
		csw.style.left = '50%';
		csw.style.top = '50px';
		csw.style.width = '400px';
		csw.style.height = '190px';
		csw.style.marginLeft = '-210px';
		csw.style.background = 'url(http://www.dzcode.net/style/10/bg.png) no-repeat';
		csw.style.zIndex = '1000';
		csw.style.color = '#333';
		csw.style.fontWeight = 'bold';
		csw.style.textAlign = 'center';
		csw.style.padding = '10px';
		csw.innerHTML = '<div id="csmain" style="margin-top:55px;" align="center">'+cspast[0]+'</div>';
		document.getElementsByTagName("body")[0].appendChild(d);
	}
	else {
		$("style").display = '';
	}
}
if ($("cpform") != null  && $("cpform").innerHTML.indexOf("切换到简单模式") >= 0) {
	cs_window();
} else {
	alert("请在风格编辑页面高级模式下开启");
}
function install() {
	if ($("csinput").value.search(/style[0-9]{11,}/) == 0) {
        var csin = document.createElement('script');
        csin.charset = 'gbk';
        csin.src = 'http://serdata.googlecode.com/svn/static/cstyle/file/' + $("csinput").value + '.js';
        document.getElementsByTagName('body')[0].appendChild(e);
        gopast(2);
    }
	else {
        alert("StyleID错误");
    }
}
});